﻿
Imports osi.root.connector
Imports osi.root.delegates
Imports osi.root.formation
Imports osi.root.procedure
Imports osi.service.argument
Imports osi.service.selector

Partial Public Class device_constructor
    Public Shared Function register(Of T)(ByVal i As Func(Of var, pointer(Of T), event_comb)) As Boolean
        Return register(make_allocator(i))
    End Function

    Public Shared Function register(Of T)(ByVal i As Func(Of var, T)) As Boolean
        Return register(make_allocator(i))
    End Function

    Public Shared Function register(Of T)(ByVal i As _do_val_ref(Of var, T, Boolean)) As Boolean
        Return register(make_allocator(i))
    End Function

    Public Shared Function register(Of T, PT)(ByVal i As Func(Of var, PT, pointer(Of T), event_comb)) As Boolean
        Return register(parameter_allocator(Of T, var, PT)(i))
    End Function

    Public Shared Function register(Of T, PT)(ByVal i As _do_val_val_ref(Of var, PT, T, Boolean)) As Boolean
        Return register(parameter_allocator(i))
    End Function

    Public Shared Function register(Of T, PT)(ByVal i As Func(Of var, PT, T)) As Boolean
        Return register(parameter_allocator(i))
    End Function

    Public Shared Function register(Of T, PT1, PT2) _
                                   (ByVal i As Func(Of var, PT1, PT2, pointer(Of T), event_comb)) As Boolean
        Return register(parameter_allocator(Of T, var, PT1, PT2)(i))
    End Function

    Public Shared Function register(Of T, PT1, PT2) _
                                   (ByVal i As _do_val_val_val_ref(Of var, PT1, PT2, T, Boolean)) As Boolean
        Return register(parameter_allocator(i))
    End Function

    Public Shared Function register(Of T, PT1, PT2)(ByVal i As Func(Of var, PT1, PT2, T)) As Boolean
        Return register(parameter_allocator(i))
    End Function

    Public Shared Function register(Of T, PT1, PT2, PT3) _
                                   (ByVal i As _func(Of var, PT1, PT2, PT3, pointer(Of T), event_comb)) As Boolean
        Return register(parameter_allocator(Of T, var, PT1, PT2, PT3)(i))
    End Function

    Public Shared Function register(Of T, PT1, PT2, PT3) _
                                   (ByVal i As _do_val_val_val_val_ref(Of var, PT1, PT2, PT3, T, Boolean)) As Boolean
        Return register(parameter_allocator(i))
    End Function

    Public Shared Function register(Of T, PT1, PT2, PT3) _
                                   (ByVal i As Func(Of var, PT1, PT2, PT3, T)) As Boolean
        Return register(parameter_allocator(i))
    End Function

    Public Shared Function register(Of T, PT1, PT2, PT3, PT4) _
                                   (ByVal i As _func(Of var, PT1, PT2, PT3, PT4, pointer(Of T), event_comb)) As Boolean
        Return register(parameter_allocator(i))
    End Function

    Public Shared Function register(Of T, PT1, PT2, PT3, PT4) _
                                   (ByVal i As _do_val_val_val_val_val_ref(Of var, 
                                                                              PT1, 
                                                                              PT2, 
                                                                              PT3, 
                                                                              PT4, 
                                                                              T,
                                                                              Boolean)) As Boolean
        Return register(parameter_allocator(i))
    End Function

    Public Shared Function register(Of T, PT1, PT2, PT3, PT4) _
                                   (ByVal i As _func(Of var, PT1, PT2, PT3, PT4, T)) As Boolean
        Return register(parameter_allocator(i))
    End Function

    Public Shared Function register(Of T)(ByVal type As String,
                                          ByVal i As Func(Of var, pointer(Of T), event_comb)) As Boolean
        Return register(type, make_allocator(i))
    End Function

    Public Shared Function register(Of T)(ByVal type As String,
                                          ByVal i As Func(Of var, T)) As Boolean
        Return register(type, make_allocator(i))
    End Function

    Public Shared Function register(Of T)(ByVal type As String,
                                          ByVal i As _do_val_ref(Of var, T, Boolean)) As Boolean
        Return register(type, make_allocator(i))
    End Function

    Public Shared Function register(Of T, PT)(ByVal type As String,
                                              ByVal i As Func(Of var, PT, pointer(Of T), event_comb)) As Boolean
        Return register(type, parameter_allocator(Of T, var, PT)(i))
    End Function

    Public Shared Function register(Of T, PT)(ByVal type As String,
                                              ByVal i As _do_val_val_ref(Of var, PT, T, Boolean)) As Boolean
        Return register(type, parameter_allocator(i))
    End Function

    Public Shared Function register(Of T, PT)(ByVal type As String,
                                              ByVal i As Func(Of var, PT, T)) As Boolean
        Return register(type, parameter_allocator(i))
    End Function

    Public Shared Function register(Of T, PT1, PT2) _
                                   (ByVal type As String,
                                    ByVal i As Func(Of var, PT1, PT2, pointer(Of T), event_comb)) As Boolean
        Return register(type, parameter_allocator(Of T, var, PT1, PT2)(i))
    End Function

    Public Shared Function register(Of T, PT1, PT2) _
                                   (ByVal type As String,
                                    ByVal i As _do_val_val_val_ref(Of var, PT1, PT2, T, Boolean)) As Boolean
        Return register(type, parameter_allocator(i))
    End Function

    Public Shared Function register(Of T, PT1, PT2)(ByVal type As String,
                                                    ByVal i As Func(Of var, PT1, PT2, T)) As Boolean
        Return register(type, parameter_allocator(i))
    End Function

    Public Shared Function register(Of T, PT1, PT2, PT3) _
                                   (ByVal type As String,
                                    ByVal i As _func(Of var, PT1, PT2, PT3, pointer(Of T), event_comb)) As Boolean
        Return register(type, parameter_allocator(Of T, var, PT1, PT2, PT3)(i))
    End Function

    Public Shared Function register(Of T, PT1, PT2, PT3) _
                                   (ByVal type As String,
                                    ByVal i As _do_val_val_val_val_ref(Of var, PT1, PT2, PT3, T, Boolean)) As Boolean
        Return register(type, parameter_allocator(i))
    End Function

    Public Shared Function register(Of T, PT1, PT2, PT3) _
                                   (ByVal type As String,
                                    ByVal i As Func(Of var, PT1, PT2, PT3, T)) As Boolean
        Return register(type, parameter_allocator(i))
    End Function

    Public Shared Function register(Of T, PT1, PT2, PT3, PT4) _
                                   (ByVal type As String,
                                    ByVal i As _func(Of var, PT1, PT2, PT3, PT4, pointer(Of T), event_comb)) As Boolean
        Return register(type, parameter_allocator(i))
    End Function

    Public Shared Function register(Of T, PT1, PT2, PT3, PT4) _
                                   (ByVal type As String,
                                    ByVal i As _do_val_val_val_val_val_ref(Of var, 
                                                                              PT1, 
                                                                              PT2, 
                                                                              PT3, 
                                                                              PT4, 
                                                                              T,
                                                                              Boolean)) As Boolean
        Return register(type, parameter_allocator(i))
    End Function

    Public Shared Function register(Of T, PT1, PT2, PT3, PT4) _
                                   (ByVal type As String,
                                    ByVal i As _func(Of var, PT1, PT2, PT3, PT4, T)) As Boolean
        Return register(type, parameter_allocator(i))
    End Function
End Class
